Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

Application-Defined Function

Movie controller components provide an action filter function that you establish with the MCSetActionFilterWithRefCon function (described on MCSetActionFilterWithRefCon ).

MyPlayerFilterWithRefCon

Your action filter function, MyPlayerFilterWithRefCon , should be in this form:

Boolean MyPlayerFilterWithRefCon (MovieController mc,
                                          short action,
                                          void *params, long refCon);
mc
Specifies the movie controller for the operation.
action
A short integer containing the action code. The movie controller component sets this parameter to point to the what field in the appropriate action structure. (Although this action is passed as a variable, it should not be changed by the filter.) See "Movie Controller Actions," which begins on Movie Controller Actions , for a description of the actions supported by movie controller components.
params
Contains a pointer to the parameter data appropriate to the action--for example, setting the playback rate. See the individual descriptions of the actions beginning on Movie Controller Actions for information about the parameters supplied for each supported action.
refCon
Contains a reference constant value. The movie controller component passes this reference constant to your action filter function each time it calls your function.

DESCRIPTION

Your filter function must return a Boolean value indicating whether it handled the action. Set the returned Boolean value to true if your function completely handles the action. In this case, the movie controller component performs no additional processing for the action. Set the returned value to false if your function does not handle the action. The movie controller component then performs the appropriate processing for the action.


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next